home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / www / UrbCedWWW.lha / urbcedwww / rexx / Indent.ucwx < prev    next >
Encoding:
Text File  |  1998-09-30  |  1.2 KB  |  50 lines

  1. /**************************************************************************/
  2. /*                               Indent.ucx                               */
  3. /*                                                                        */
  4. /*                    Copyright ©1998 by Dick Whiting                     */
  5. /*                                                                        */
  6. /*------------------------------------------------------------------------*/
  7. /*      Used with UrbCedWWW for indenting a block of text.                */
  8. /*      See the UrbCedWWW Readme for a more complete description.         */
  9. /**************************************************************************/
  10. /*
  11. $VER: 1.0 Copyright ©1998 by Dick Whiting
  12. */
  13.  
  14. parse arg val
  15. val=strip(val)
  16.  
  17. if val='' then val=3
  18. if ~datatype(val,'N') then val=3
  19.  
  20. Address CYGNUSED
  21. options results
  22.  
  23. 'STATUS INSERTMODE'
  24. ison=result
  25. if ~ison then 'INSERT MODE'
  26.  
  27. 'CEDTOFRONT'
  28.  
  29. 'STATUS BLOCKY'
  30. mark1=result+1
  31.  
  32. if mark1=0 then do
  33.    'OKAY1' "No block marked for indenting"
  34. end
  35. else do
  36.    mark1=mark1
  37.    'STATUS CURSORLINE'
  38.    mark2=result+1
  39.    start=min(mark1,mark2)
  40.    end=max(mark1,mark2)
  41.    do i=start to end
  42.       'LL' i
  43.       'TEXT' copies(' ',val)
  44.    end
  45.    'LL' mark2
  46. end
  47.  
  48. exit
  49.  
  50.